Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@prisma/get-platform
Advanced tools
The @prisma/get-platform npm package is a utility library used to detect the platform on which the Node.js process is running. It can identify the operating system and architecture, which is particularly useful for tools that need to download or use platform-specific binaries.
Detecting the platform
This feature allows you to programmatically detect the current platform. The `getPlatform` function returns a promise that resolves to a string indicating the platform, such as 'darwin', 'linux', 'windows', etc.
"require('@prisma/get-platform').getPlatform().then(platform => console.log(platform))"
Detecting the platform synchronously
This feature provides a synchronous way to detect the platform. The `getPlatformSync` function returns a string directly without a promise, which can be useful in scenarios where asynchronous code is not ideal.
"const { getPlatformSync } = require('@prisma/get-platform');
const platform = getPlatformSync();
console.log(platform);"
The 'os' module is a built-in Node.js module that provides operating system-related utility methods. It is similar to @prisma/get-platform in that it can be used to get information about the operating system, but it does not provide as specific platform identifiers for downloading binaries.
The 'detect-libc' package is used to detect the C standard library used on the system (e.g., glibc or musl). It is similar to @prisma/get-platform in that it helps in identifying system-specific characteristics important for binary compatibility, but it focuses on the C library rather than the operating system platform.
The 'systeminformation' package provides detailed information about the system hardware and software. While it offers a broader range of system insights compared to @prisma/get-platform, it is not specifically tailored for identifying platforms for binary downloads.
Platform detection used for Prisma 2 binaries.
import { getPlatform } from '@prisma/get-platform'
const platform = await getPlatform()
FAQs
This package is intended for Prisma's internal use
We found that @prisma/get-platform demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.